import java.util.Arrays;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-11-25
 * Time: 15:16
 * To BE A Better Person-2020-3-2
 */
class Student implements Comparable<Student>{
    public int sco;
    public int age;

    public Student(int sco, int age) {
        this.sco = sco;
        this.age = age;
    }

    @Override
    public int compareTo(Student o) {
        if(this.age>o.age){
            return 1;
        }else if(this .age < o.age){
            return -1;
        }else{
            return 0;
        }

    }


}
public class TestDemo {
    public static void main(String[] args) {
        Student student1=new Student(90,20);
        Student student2=new Student(89,30);
        int ret=student1.compareTo(student2);

    }
}
